using MediatR;
using System;
using System.ComponentModel.DataAnnotations;

namespace B.S.NewMedical.Api.Write.Application.Command.ContentManagement.Registration
{
    /// <summary>
    /// 添加挂号命令
    /// </summary>
    public class AddRegistrationCommand : IRequest<int>
    {
        /// <summary>
        /// 就诊卡号（可选，如果不提供将根据患者ID自动查询）
        /// </summary>
        [StringLength(20, ErrorMessage = "就诊卡号长度不能超过20个字符")]
        public string? Card_no { get; set; }

        /// <summary>
        /// 患者ID
        /// </summary>
        [Required(ErrorMessage = "患者ID不能为空")]
        public int Patient_id { get; set; }

        /// <summary>
        /// 医生ID
        /// </summary>
        [Required(ErrorMessage = "医生ID不能为空")]
        public int Doctor_id { get; set; }

        /// <summary>
        /// 科室ID
        /// </summary>
        [Required(ErrorMessage = "科室ID不能为空")]
        public int Dept_id { get; set; }

        /// <summary>
        /// 就诊日期
        /// </summary>
        [Required(ErrorMessage = "就诊日期不能为空")]
        public DateTime Visit_date { get; set; }

        /// <summary>
        /// 挂号费
        /// </summary>
        [Required(ErrorMessage = "挂号费不能为空")]
        [Range(0, 9999.99, ErrorMessage = "挂号费必须在0到9999.99之间")]
        public decimal Fee { get; set; }

        /// <summary>
        /// 操作人
        /// </summary>
        public string? CreatePeople { get; set; }
    }
} 